package com.yw.directory.vo;


import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import org.springframework.data.annotation.Id;

import java.util.List;

/**
 * @author taj
 * @version 1.0
 */
@Data
public class DirectoryVO {

    /**
     * 内码，主键，自增长
     */
    @Id
    @Schema(name = "id", description = "总表id")
    private Integer id;

    /**
     * 目录名，主键，必填，最大长度30
     */
    @NotBlank(message = "目录名不能为空")
    @Schema(name = "name", description = "目录名")
    private String name;

    /**
     * 父级id，必填
     */
    @Schema(name = "parentId", description = "父级id")
    private Integer parentId;

    @Schema(name = "childName", description = "叶子节点的信息")
    private List<DirectoryVO> childDirectory;
}

